{template 'common/header'}
<link type="text/css" rel="stylesheet" href="{__CSS__}/slider.css" />
<script type="text/javascript" src="{__JS__}/bootstrap-slider.js"></script>
<div class="main">
	<ul class="nav nav-tabs">
        <li><a href="{php echo $this->createWebUrl('project');}">返回项目列表</a></li>
        <li><a href="{php echo $this->createWebUrl('packet', array('id' => $project_id));}">{$project['title']}红包列表</a></li>
        <li class="active"><a href="{php echo $this->createWebUrl('packet', array('act' => 'add', 'id' => $project_id));}">添加红包</a></li>
	</ul>
	<form action="" class="form-horizontal form" method="post" autocomplete="off">
		<input type="hidden" name="packet_id" value="{$item['id']}">
		<input type="hidden" name="token" value="{$_W['token']}" />
		<input type="hidden" name="act" value="update" />
		<div class="panel panel-default">
			<div class="panel-heading">
                            查看红包详情
			</div>
			<div class="panel-body">
				<div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">红包类型</label>
                                    <div class="col-sm-8"><input type="text" class="form-control" readonly value="{$type_text[$project['type']]}" /></div>
				</div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">红包金额</label>
                                    <div class="col-sm-8"><input type="text" class="form-control" readonly value="{php echo $item['money']/100;}" /></div>
				</div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">红包状态</label>
                                    <div class="col-sm-8"><input type="text" class="form-control" readonly value="{if $item['status'] == 1}已领取{else}未领取{/if}" /></div>
				</div>
                                {if $item['status'] == 1}
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">领取人</label>
                                    <div class="col-sm-8"><input type="text" class="form-control" readonly value="{php echo getNicknameByOpenid($receive['openid']);}" /></div>
				</div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">领取时间</label>
                                    <div class="col-sm-8"><input type="text" class="form-control" readonly value="{php echo timeTostr($receive['createtime']);}" /></div>
				</div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">领取IP</label>
                                    <div class="col-sm-8"><input type="text" class="form-control" readonly value="{$receive['ip']}" /></div>
				</div>
                                {/if}
			</div>
		</div>
	</form>
</div>
{template 'common/footer'}